//2009/08/28 00:28:20
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class GrabbingTaxi
{
public:
    int minTime(vector <int> tXs, vector <int> tYs, int gX, int gY, int walkTime, int taxiTime)
    {
		int mmin = (abs(gX) + abs(gY)) * walkTime;
		for(int i=0; i<tXs.size(); i++)
		{
			int temp = walkTime*(abs(tXs[i]) + abs(tYs[i])) + taxiTime*(abs(gX-tXs[i]) + abs(gY-tYs[i]));
			mmin = min(mmin, temp);
		}
		return mmin;
    }
};
